/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.ove.openmath.courses.editor.events;

/**
 *
 * @author Mr.Sam
 */
import java.util.EventObject;

/**
* The event to send to all objects that implements the interface EditorListener
* and which want to be alerted of changes of the applet they are listening to.
*
* @author © 1999 DIRAT Laurent
* @version 1.0  21/04/99
*/
public class EditorEvent extends EventObject {
    /**
    * The action to execute with the event.
    */
    private Object action;

    /**
    * The argument of the action to execute.
    */
    private Object argument;

    /**
    * The constructor.
    * @param src the object which produces this event.
    */
    public EditorEvent(Object src) {
        super(src);
    }

    /**
    * Sets the action and its argument, if necessary, to execute to the event.
    * @param action the action to execute.
    * @param argument the action argument. If the action don't need
    * an argument, it must be sets to <CODE>null</CODE>.
    */
    public void setAction(Object action, Object argument) {
        this.action = action;
        this.argument = argument;
    }

    /**
    * Returns the action associated with the event.
    */
    public Object getAction() {
        return action;
    }

    /**
    * Returns the argument of the action.
    */
    public Object getArgument() {
        return argument;
    }

    
}

